#ifndef TOOLS_H
#define TOOLS_H

#include <bn_fixed_point.h>
#include <bn_fixed_rect.h>
#include <bn_point.h>
#include <bn_string.h>

namespace tool
{
    int convertStringToDecimalInteger(const bn::string<3>& value);

    bn::point convert2dToIsoPoint(const int x, const int y);
    bn::point convert2dToIsoPoint(const bn::fixed_point& point);
    bn::point convert2dToScreenPoint(const int x, const int y, const int width, const int height);
    bn::point convert2dToScreenPoint(const bn::fixed_point& point, const int width, const int height);

    struct isoPoint
    {
        int x, y, hDistance, vDistance;
    };

    isoPoint convert3dToIsoPoint(const bn::fixed_point& point, const int height);
}

namespace checker
{
    bool areObjectsOverlapping(const bn::fixed_rect& objectARect, const bn::fixed_rect& objectBRect, const int objectAHeight, const int objectBHeight);
    bool isObjectAInFrontOfObjectB(const bn::fixed_rect& objectARect, const bn::fixed_rect& objectBRect, const int objectAHeight, const int objectBHeight);
}

#endif // TOOLS_H
